package com.training.api.repository;

import com.training.bean.AppVersion;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface AppVersionRepository extends JpaRepository<AppVersion, Integer> {
    
    /**
     * 获取最新的App版本信息
     * @return 最新的App版本信息
     */
    @Query("SELECT a FROM AppVersion a ORDER BY a.versionCode DESC")
    AppVersion findLatestVersion();
}